package com.lanou.sfu.songforu.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import java.util.List;

/**
 * Created by dllo on 15/10/27.
 */
public class ArtistDetailViewPagerAdapter extends FragmentPagerAdapter {
    private String[] title = {"歌曲", "专辑"};
    private List<Fragment> fragmentList;
    public ArtistDetailViewPagerAdapter(FragmentManager fm){
        super(fm);
    }

    public void setData(List<Fragment> fragmentList) {
        this.fragmentList = fragmentList;
    }
    @Override
    public Fragment getItem(int position) {

        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return title.length;
    }


    @Override
    public CharSequence getPageTitle(int position) {
        return title[position];
    }
}
